<template>
  <!-- 新增、修改工种信息 -->
  <base-modal
    :title="pageType === 'edit' ? '工种设置编辑': '工种设置添加'"
    cancelText="取消"
    okText="保存"
    :width="800"
    v-on="$listeners"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <a-form :form="formInfo">
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="名称"
            :labelCol="{ lg: { span: 6 }, sm: { span: 5 } }"
            :wrapperCol="{lg: {span: 17}, sm: {span: 17} }"
          >
            <BaseInput placeholder="请输入名称" v-decorator="['name']" />
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="是否可用"
            :labelCol="{ lg: { span: 6 }, sm: { span: 5 } }"
            :wrapperCol="{lg: {span: 17}, sm: {span: 17} }"
          >
            <a-select placeholder="请选择是否可用" v-decorator="['isUseful']">
              <!-- <a-select-option value="0">是</a-select-option>
              <a-select-option value="1">否</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </base-modal>
</template>

<script>
import BaseModal from '@/components/BaseModal'
export default {
    name:'a'+Date.now(),  components: {
    BaseModal,
  },
  data() {
    return {
      pageType: 'add',
      formInfo: this.$form.createForm(this, { name: 'updateForm' }),
    }
  },
  methods: {
    handleCancel() {
      this.$emit('cancel')
    },
    handleOk() {
      this.$emit('ok')
    },
  },
}
</script>

<style>
</style>